package com.jun.generator.utils;

import com.jun.generator.core.GeneratorCore;

import java.util.Arrays;
import java.util.List;

/**
 * @author yuejun.li
 * @date 2024/4/29 11:20:54
 */
public class ServiceGeneratorUtil {
    //项目内子模块
    final static String provider = "jun-admin-core";
    //项目名称，把前缀省去了(最里面那个包名)
    final static String project = "core";
    //项目名称路径
    final static String projectPath = "jun-admin";

    //输出的路径：基本目录
    final static String baseDir = System.getProperty("user.dir") + "\\" + projectPath;
    //父包名
    final static String base = "com.jun.admin.core";
    //java包路径开始算：基本包路径
    final static String packageDir = "com\\jun\\admin";
    //作者
    final static String author = "yuejun.li";
    //数据库url
    final static String url = "jdbc:mysql://121.37.245.48:3306/jun-admin?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai";
    //账号
    final static String userName = "root";
    //密码
    final static String password = "lyj182725066";
    //表名
    final static List<String> tables = Arrays.asList("admin_wesocket_log");

    public static void main(String[] args) {
        GeneratorCore.Param param = new GeneratorCore.Param();
        param.setBaseDir(baseDir);
        param.setBasePackageName(base);
        param.setAuthor(author);
        param.setUrl(url);
        param.setUserName(userName);
        param.setPassword(password);
        param.setTables(tables);
        param.setProvider(provider);
        param.setProject(project);
        param.setPackageDir(packageDir);
        GeneratorCore.create(param);
    }
}

